package com.wg.springboot.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component //把这个类交给spring管理
@ConfigurationProperties(prefix = "school") //该类为配置类
public class School {
//    映射配置文件的school.name的value给这个属性  生成getset方法  其他地方注入该类就可以取到了
    private String name;
    private String websit;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWebsit() {
        return websit;
    }

    public void setWebsit(String websit) {
        this.websit = websit;
    }
}
